package com.lxc.networkdemo.apis

import com.lxc.networkdemo.bean.BaseData
import com.lxc.networkdemo.bean.DataBean
import kotlinx.coroutines.Deferred
import retrofit2.Response
import retrofit2.http.*

/**
 *@author: xuancai.Liu
 *@create: 2021-09-06 17:23
 *@program: NetDemo
 *@description:
 * Api接口类可以按业务区分，也可按页面区分
 */
interface InfoApis {

    @GET("weather_mini")
    fun getDataForDeferredAsync(@Query("city") city: String): Deferred<Response<BaseData<DataBean>>>

    @GET("weather_mini")
    suspend fun getDataForSuspendAsync(@Query("city") city: String): Response<BaseData<DataBean>>
}